import 'uno.css'
import '@/style/index.less'
import 'ant-design-vue/dist/reset.css'

import { createApp } from 'vue'

import { setupI18n } from '@/locale/setupI18n'
import { router, setupRouter } from '@/router'
import { setupRouterGuard } from '@/router/guard'
import { setupStore } from '@/store'

import App from './App.vue'

async function appInint() {
  const app = createApp(App)

  // store
  setupStore(app)

  // 内部系统配置

  // 注册全局组件

  // 多语言配置
  await setupI18n(app)

  // 配置路由
  setupRouter(app)

  // 路由守卫
  setupRouterGuard(router)

  // 全局指令

  // 全局错误处理

  // next-router 等待路由准备就绪

  // 挂载
  app.mount('#app')
}
appInint()